libnvme/cmds: change copy desc format 0h and 2h elbt to big-endian#3183
libnvme/cmds: change copy desc format 0h and 2h elbt to big-endian#3183ikegami-t wants to merge 9 commits intolinux-nvme:masterfrom
Conversation
|
@igaw @keithbusch @brandon-paupore-sndk @zwxdg @chenghong085 Could you please review the changes? For the issue: #2975 I have rejected the PR: #2977 then the issue also closed. To make consistent just created this PR changes but for the changes I considered again so still the issue: #2975 mentioned seems correct also.. To make sure should we ask to NVMe org about this specification? |
|
Would it be possible to have a unit tests for this? Given the amount of discussion around this API I think it would be great to have one. Maybe we could get a binary copy of an existing log page and decode it then? |
|
Okay will do try it later. Thank you. |
|
Just created the separated PR: #3185 for the unit test. |
libnvme/src/nvme/types.h
Outdated
There was a problem hiding this comment.
I wonder if we should rename this struct to nvme_copy_range_f0 because also the spec names this f0.
|
Looks good. I saw that there are a handful of new fields defined in the newest spec. We might want to add them too. WDYT? BTW, the commit message doesn't match anymore. This change updates the names of the fields. |
|
Yes I will do rename the struct and add new fields by additional commits. Thank you. |
694c106 to
cf45db5
Compare
|
Sorry for my recent changes and you had to rebase your work. I'll just have to read up on the little to big endian change in your explanation. It strikes me a bit odd that one field is big endian, but that might just be my OCD... |
|
No problem. The changes to move the nvme_init_* implementation to header look good. Just changed the odd big endian field to array as same with the copy range format 1 and 3. |
Since the format 1h and 3h elbt values are set as big-endian. Also change the field name eilbrt to elbt as following spec. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Since the elbt field changed to big-endian. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Change both the struct name and the init API names. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Just followed NVMe command set spec revision 1.2. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Just followed NVMe command set spec revision 1.2. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Just followed NVMe command set spec revision 1.2. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Change odd big-endian field as same with the format 1h and 2h. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
369f02f to
6109e6f
Compare
Since the format elbt values are set as big-endian then follow it. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6109e6f to
612a752
Compare
Since the function just depended on the little endian build. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>

Since the format 1h and 3h elbt values are set as big-endian. Also change the field name eilbrt to elbt as following spec.